#include <iostream>
#include <string>

#include <cstdio>
#include <cstdlib>

#include <sys/types.h>
#include <unistd.h>
#include <signal.h>

void Usage(std::string proc)
{
    std::cout << "Usage:\n\t" <<  proc << "signum pid" << std::endl;
}

int main(int argc, char* argv[])
{
    if (argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    int signum = std::stoi(argv[1]);
    pid_t pid = std::stoi(argv[2]);
    
    int n = kill(pid, signum);
    if (n == -1)
    {
        perror("kill");
        exit(2);
    }

    return 0;
}